package cn.com.tt.flink.sql.engine.processor;

import cn.com.tt.flink.runner.AbstractProcessorBuilder;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;

public class JobProcessorBuilder extends AbstractProcessorBuilder {

    public JobProcessorBuilder(String[] args) {
        super(args);
    }

    public JobProcessorBuilder build(StreamTableEnvironment tableEnv, StreamExecutionEnvironment env) {
        add(new LoadJobConfigProcessor(tableEnv, args));
        add(new RegisterUdfProcessor(tableEnv));
        add(new RegisterSourceProcessor(tableEnv));
        add(new SqlProcessor(tableEnv));
        return this;
    }

}
